<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
 <form name="frm" method="post">
     用户名:<input type="text" name=""><br/>
     <input type="submit" value="检验" onclick="submitFrm('check')">
     <input type="submit" value="注册" onclick="submitFrm('reg')">
 </form>
</body>
</html>
<script>
    function submitFrm(method){
        frm.action="user_" + method +".action"
        frm.submit();
    }

</script>

